<?php

namespace Modules\ShopApi\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class EditSiteRequest extends FormRequest
{
    
      
    public function authorize()
    {
        return true;
    }
	public function rules()
    {
        return [
			'id' 				=> 'required|is_positive_integer',
			'name' 				=> 'required',
			'phone' 			=> 'required|is_phone',
			'province_id' 		=> 'required|is_positive_integer',
			'city_id' 			=> 'required|is_positive_integer',
			'county_id' 		=> 'required|is_positive_integer',
			'detailed_address' 	=> 'required',
			'status' 			=> 'required|is_status_integer',
        ]; 
    }  
	public function messages(){   
		return [
			'id.required' 						=> '缺少参数（id）！',
			'id.is_positive_integer' 			=> '（id）错误！',
			'name.required' 				  	=> '请输入姓名！',
			'phone.required' 					=> '请输入手机号！',
			'phone.is_phone' 					=> '手机号格式错误！',
			'province_id.required' 				=> '请选择地区！',
			'province_id.is_positive_integer' 	=> '请选择地区！',
			'city_id.required' 					=> '请选择地区！',
			'city_id.is_positive_integer' 		=> '请选择地区！',
			'county_id.required' 				=> '请选择地区！',
			'county_id.is_positive_integer' 	=> '请选择地区！',
			'detailed_address.required' 		=> '请输入详细地址！',
			'status.required' 					=> '参数错误（status）！',
			'status.is_status_integer' 			=> '参数错误（status）！',
		];
	}
}









